package com.zero.cloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 健康检测控制器
 *
 * @author MARCH
 * @className DefaultController
 * @description
 * @date 2025/6/3 20:59
 */
@RestController
public class HealthController {
    @Value("${spring.application.name:node}")
    private String appName;
    @Value("${server.port:0000}")
    private String port;

    /**
     * 健康检测
     */
    @GetMapping("/health")
    public String health() {
        return "I'm " + appName + " and I'm running on port " + port;
    }
}
